<template>
  <!-- 预警打印 -->
  <div class="print">
    <div id="printMe">
      <table
        align="center"
        width="100%"
        border="1"
        cellspacing="0"
        cellpadding="0"
        style="border:none;"
      >
        <caption align="top">
          <h1>邯郸站干部安全诚信管理预警通知书</h1>
          <p style="font-size:20px">
            {{ newData.date_year_name }}年&emsp;{{ newData.num_by_year }}号
          </p>
        </caption>
        <tr width="300" class="topTitle">
          <div style="position:absolute;">
            车间（中间站）、科室：{{ data.employee_dept_id__name }}
          </div>
          <div style="position:absolute;right:70px">
            填发日期：{{ newData.date }}
          </div>
        </tr>
        <tr>
          <th width="150" style=" border-color: #000;">被预警人</th>
          <th class="topButtonTable">
            {{ data.employee_name }}/{{ data.employee_job_id__name }}
          </th>
        </tr>
        <tr>
          <th width="150" class="topButtonTableLeft">
            <p style="marginBottom:10px">预警</p>
            <P>事项</P>
          </th>
          <td class="innerTable">{{ data.name }}</td>
        </tr>
        <tr>
          <th width="150" class="topButtonTableLeft">
            <p style="marginBottom:10px">整改</p>
            <P>措施</P>
          </th>
          <td class="innerTable">{{ data.solution }}</td>
        </tr>
        <tr>
          <th width="150" class="topButtonTableLeft">
            <p style="marginBottom:10px">被预警人</p>
            <P>签字</P>
          </th>
          <td class="innerTable">
            <div
              class="examine"
              style="text-align:left;margin:6px;min-height:200px;position:relative"
            >
              <div style="position:absolute;bottom:10px;right:20px;">
                年&emsp;月&emsp;日
              </div>
            </div>
          </td>
        </tr>
        <tr>
          <td colspan="2" border="0" style="border:none;text-align:left">
            <p style="margin:10px">
              注：本通知书一式三份，被预警人一份；所在部门一份、劳人科一份，分别留存1年备查。
            </p>
          </td>
        </tr>
      </table>
    </div>
    <div style="text-align:center;margin-top:16px;">
      <el-button v-print="'#printMe'" type="primary">打印</el-button>
    </div>
  </div>
</template>

<script>
import './style.scss'
export default {
  props: {
    data: { type: Object, default: () => {} }
  },

  computed: {
    newData() {
      return this.data
    }
  }
}
</script>
